<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<head>

	<!-- Basic Page Needs
  ================================================== -->
	<meta charset="utf-8">
	<title>俗谣雅玖-心动</title>
	<link href="${pageContext.request.contextPath}/images/logo.ico" rel="icon" type="image/x-ico">
	<meta name="description" content="">
	<meta name="author" content="">
	<link href="${pageContext.request.contextPath}/images/logo.ico" rel="icon" type="image/x-ico">

	<!-- Mobile Specific Metas
	================================================== -->
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

	<!-- CSS
	================================================== -->
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css1/zerogrid.css">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css1/style.css">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css1/lightbox.css">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/main.css" type="text/css" />
	<link rel="stylesheet" href="${pageContext.request.contextPath}/bootstrap/css/bootstrap.min.css" type="text/css" />
	<!-- Custom Fonts -->
	<link href="${pageContext.request.contextPath}/css1/font-awesome.min.css" rel="stylesheet" type="text/css">

	<link rel="stylesheet" href="${pageContext.request.contextPath}/css1/menu.css">
	<script src="${pageContext.request.contextPath}/js1/jquery1111.min.js" type="text/javascript"></script>
	<script src="${pageContext.request.contextPath}/js1/script.js"></script>

	<!-- Owl Carousel Assets -->
	<link href="owl-carousel/owl.carousel.css" rel="stylesheet">
	<!-- <link href="owl-carousel/owl.theme.css" rel="stylesheet"> -->

	<!--[if lt IE 8]>
       <div style=' clear: both; text-align:center; position: relative;'>
         <a href="http://windows.microsoft.com/en-US/internet-explorer/Items/ie/home?ocid=ie6_countdown_bannercode">
           <img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
        </a>
      </div>
    <![endif]-->
	<!--[if lt IE 9]>
		<script src="${pageContext.request.contextPath}/js/html5.js"></script>
		<script src="${pageContext.request.contextPath}/js/css3-mediaqueries.js"></script>
	<![endif]-->

</head>

<body>
	<div class="wrap-body">
		<div class="header">
			<div id='cssmenu' class="align-right">
				<ul>
					<li class="active">
						<a href='beckoning.jsp'><span>心动</span></a>
					</li>
					<c:choose>
						<c:when test="${empty user}">
							<li>
								<a href="${pageContext.request.contextPath}/suyaoyajiu/login.jsp">登录</a>
							</li>
						</c:when>
						<c:otherwise>
							<li><a href="${pageContext.request.contextPath}/tiaozhuan.do">个人中心</a> </li>
							<li><a href="${pageContext.request.contextPath}/logout.do">用户退出</a> </li>
						</c:otherwise>
					</c:choose>
					<li class='last'>
						<a href="http://wpa.qq.com/msgrd?v=3&uin=1013042589&site=qq&menu=yes"><span>联系</span></a>
					</li>
				</ul>
			</div>
		</div>
		<section id="container">
			<div id="divpagecontent">
				<table width="100%" border="0" cellspacing="0">
					<tr>
						<td>
							<div style="text-align:right; margin:5px 10px 5px 0px">
								<a href="${pageContext.request.contextPath}/product/index.do">首页</a>
								&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;
								${category.name}
								&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;
								商品列表
							</div>
							<table cellspacing="0" class="listcontent">
								<tr>
									<td>
										<h1>商品目录</h1>
										<hr />
										<h1>${category.name}</h1>&nbsp;&nbsp;&nbsp;&nbsp;共${pageInfo.total}种商品
										<hr />
										<table cellspacing="0" class="booklist">
											<tr>
												<c:forEach items="${pageInfo.list}" var="p" varStatus="vs">
													<td>
														<div class="divbookpic">
															<p>
																<a href="${pageContext.request.contextPath}/product/findProductById.do?id=${p.id}">
																	<img src="${pageContext.request.contextPath}/${p.imgurl}" width="115" height="129" border="0" />
																</a>
															</p>
														</div>
														<div class="divlisttitle">
															<a href="${pageContext.request.contextPath}/product/findProductById.do?id=${p.id}">商品名： ${p.name}		<br /></a>
														</div>
													</td>
												</c:forEach>
											</tr>
										</table>
										<div class="container">
											<div class="col-md-12 column" style="text-align: center">
												<ul class="pagination" style="width:auto">
													<c:choose>
														<c:when test="${pageInfo.pageNum == 1}">
															<li class="disabled">
																<a href="#">上一页</a>
															</li>
														</c:when>
														<c:otherwise>
															<li>
																<a href="${pageContext.request.contextPath}/product/pageProduct.do?currentPage=${pageInfo.pageNum-1}&id=${category.id}">上一页</a>
															</li>
														</c:otherwise>
													</c:choose>

													<c:forEach begin="1" end="${pageInfo.pages}" var="pp">
														<c:choose>
															<c:when test="${pageInfo.pageNum == pp}">
																<li class="active">
																	<a href="#">${pp}</a>
																</li>
															</c:when>
															<c:otherwise>
																<li>
																	<a href="${pageContext.request.contextPath}/product/pageProduct.do?currentPage=${pp}&id=${category.id}">${pp}</a>
																</li>
															</c:otherwise>
														</c:choose>
													</c:forEach>


													<c:choose>
														<c:when test="${pageInfo.pageNum == pageInfo.pages}">
															<li class="disabled">
																<a href="#">下一页</a>
															</li>
														</c:when>
														<c:otherwise>
															<li>
																<a href="${pageContext.request.contextPath}/product/pageProduct.do?currentPage=${pageInfo.pageNum+1}&id=${category.id}">下一页</a>
															</li>
														</c:otherwise>
													</c:choose>
												</ul>
											</div>
										</div>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
				</section>
					</div>
				</div>
			</div>
		</section>
	</div>
</body>

</html>